using System;
using System.Collections.Generic;
using System.Text;

using Mono.Cecil;

namespace CILDiffLibPrime.Collectors
{
    public class MergeCollector : AbstractCollector
    {
        PackageBinary m_package;
        AssemblyDefinition m_merge;

        public MergeCollector( PackageBinary package )
        {
            this.m_package = package;
        }

        public override void OnCompareTypeBegin(TypeDefinition a, TypeDefinition b)
        {
        }

        public override void OnCompareTypeEnd(ChangeResult result, TypeDefinition a, TypeDefinition b)
        {
        }

        public override void OnDeletedTypes(List<TypeDefinition> types)
        {
            m_package.PackageDeletedClasses(m_merge, types);
        }

        public override void OnNewTypes(List<TypeDefinition> types)
        {
            m_package.PackageNewClasses(m_merge, types);
        }

        public override void OnCompareMethodBegin(MethodDefinition a, MethodDefinition b)
        {
        }

        public override void OnCompareMethodEnd(ChangeResult result, MethodDefinition a, MethodDefinition b)
        {
            //m_package.PackageModifiedMethod(mVersion.Original,
            //                 mVersion.Target,
            //                 (TypeDefinition)mVersion.Target.DeclaringType,
            //                 m_merge,
            //                 signature, body, returnType, attributes, properties, overrides, parameters,
            //                 genericparameters, customAttributes);
        }

        public override void OnDeletedMethods(TypeDefinition parent, List<MethodDefinition> methods)
        {
            m_package.PackageDeletedMethods(m_merge, parent, methods);
        }

        public override void OnNewMethods(List<MethodDefinition> methods)
        {
            m_package.PackageNewMethods(m_merge, methods);
        }

        public override void OnCompareFields(FieldDefinition a, FieldDefinition b)
        {
        }

        public override void OnDeletedFields(List<FieldDefinition> methods)
        {
        }

        public override void OnNewFields(List<FieldDefinition> methods)
        {
        }

        public override void OnCompareProperties(PropertyDefinition a, PropertyDefinition b)
        {
        }

        public override void OnDeletedProperties(List<PropertyDefinition> properties)
        {
        }

        public override void OnNewProperties(List<PropertyDefinition> properties)
        {
        }
    }
}